import '@/utils/request'
import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

// 获取租赁支出列表
const getLeaseDisburseLs = params => {
    return httpPost({
        url: '/turnoversettle/LeaseExpendSettle/list',
        params
    })
}
// 获取租赁支出基础信息
const getLeaseDisburseBase = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getBuySettle',
        params
    })
}
// 新增租赁支出基础信息
const addLeaseDisburseBase = params => {
    return httpPost({
        url: '/turnoversettle/LeaseExpendSettle/save',
        params
    })
}
// 修改租赁支出基础信息
const modifyLeaseDisburseBase = params => {
    return httpPost({
        url: '/turnoversettle/LeaseExpendSettle/update',
        params
    })
}
// 删除租赁支出单据
const delLeaseDisburseBase = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/delete',
        params
    })
}
// 获取租赁结算明细
const getLeaseDisburseDetailLs = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getDtlList',
        params
    })
}
// 修改租赁结算明细
const modifyLeaseDisburseDetailLs = params => {
    return httpPost({
        url: '/turnoversettle/LeaseExpendSettle/updateDtl',
        params
    })
}
// 获取服务费用明细
const getLeaseDisburseServiceLs = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getFreightDtl',
        params
    })
}
// 修改服务费用明细
const modifyLeaseDisburseServiceLs = params => {
    return httpPost({
        url: '/turnoversettle/LeaseExpendSettle/updateFreightDtl',
        params
    })
}
// 获取租赁退场结算明细
const getLeaseDisburseZltcLs = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getExitDtlList',
        params
    })
}
// 更新租赁退场结算明细
const modifyLeaseDisburseZltcLs = params => {
    return httpPost({
        url: '/turnoversettle/LeaseExpendSettle/updateExitDtl',
        params
    })
}
// 查询保证金明细
const getLeaseDisburseBzjLs = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getDepositDtlList',
        params
    })
}
// 更新保证金明细
const modifyLeaseDisburseBzjLs = params => {
    return httpPost({
        url: '/turnoversettle/LeaseExpendSettle/updateDeppsitDtl',
        params
    })
}
// 查询分包商分摊成本明细
const getLeaseDisburseFtcbLs = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getCostSharingDtl',
        params
    })
}
// 更新分包商分摊成本明细
const modifyLeaseDisburseFtcbLs = params => {
    return httpPost({
        url: '/turnoversettle/LeaseExpendSettle/updateCostSharingDtl',
        params
    })
}

const flowCommit = params => {
    return httpPost({
        url: '/turnoversettle/audit/commit',
        params
    })
}
const flowAudit = params => {
    return httpPost({
        url: '/turnoversettle/audit/audit',
        params
    })
}
const flowUndoAudit = params => {
    return httpPost({
        url: '/turnoversettle/audit/undoAudit',
        params
    })
}
const flownullify = params => {
    return httpPost({
        url: '/turnoversettle/audit/nullify',
        params
    })
}
// 获取流程按钮显示状态
const getCurrentState = params => {
    return httpPost({
        url: '/turnoversettle/audit/getCurrentUnitInfo',
        params
    })
}
// 获取审核历史
const getAuditHistoryLs = params => {
    return httpPost({
        url: '/turnoversettle/audit/getAuditHistory',
        params
    })
}
// 获取冲销对象
const getReversalObject = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getReversalObject',
        params
    })
}
//初始化红单信息
const getInitRed = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/initRed',
        params
    })
}
//获取源单上期末累计结算金额
const getPrevAmount = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getPrevAmount',
        params
    })
}
//获取剩余预付款金额
const getAdvancePayment = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/getAdvancePayment',
        params
    })
}
//校验合同或计划是否在变更中
const checkIsChange = params => {
    return httpGet({
        url: '/turnoversettle/LeaseExpendSettle/checkIsChange',
        params
    })
}

export {
    getLeaseDisburseLs,
    getLeaseDisburseBase,
    addLeaseDisburseBase,
    modifyLeaseDisburseBase,
    delLeaseDisburseBase,
    getLeaseDisburseDetailLs,
    modifyLeaseDisburseDetailLs,
    getLeaseDisburseServiceLs,
    modifyLeaseDisburseServiceLs,
    getLeaseDisburseZltcLs,
    modifyLeaseDisburseZltcLs,
    getLeaseDisburseBzjLs,
    modifyLeaseDisburseBzjLs,
    getLeaseDisburseFtcbLs,
    modifyLeaseDisburseFtcbLs,
    flowCommit,
    flowAudit,
    flowUndoAudit,
    flownullify,
    getCurrentState,
    getAuditHistoryLs,
    getReversalObject,
    getInitRed,
    getPrevAmount,
    getAdvancePayment,
    checkIsChange
}
